﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace YahooFinance
{
    /// <summary>
    /// Miscellaneous helper functions
    /// </summary>
    public static class Helpers
    {
        /// <summary>
        /// Get a chart URL for a given exchange symbol
        /// </summary>
        /// <param name="symbol">The exchange symbol</param>
        /// <param name="height">The height of the graph</param>
        /// <param name="width">The width of the graph</param>
        /// <returns>The URL for the graph image</returns>
        public static string GetChartUrlForSymbol(string symbol, int height, int width)
        {
            return String.Format("http://chart.finance.yahoo.com/t?s={0}&lang=en-GB&region=GB&width={2}&height={1}",
                symbol,
                height,
                width);
        }
    }
}
